<template>
 <view>
  <view class="waitFor">
  	<image src="../../static/customer.png" mode="" class="wait"></image>
  </view>
  <view class="contact">
  请耐心等待，客服马上和您联系
  </view>
 </view>
</template>

<script>
import {mapActions,mapState} from 'vuex'
 export default {
   data () {
     return {

     }
   },
   components: {

   },
   methods: {
   ...mapActions({
      getData: "MANAGEMENT/GET_DATA", //获取用户信息
   })
   },
   mounted() {

   },
   onShow(){ 
   },
   onPullDownRefresh(){
	   this.getData().then(res=>{
		setTimeout(()=>{
					   console.log(this.information)
		if (this.information.check_status == 1) {
					    uni.switchTab({
					      url: "/pages/management/index",
					    });
					    uni.setStorageSync("flag", true);
					  } else if (this.information.check_status == 2) {
					    uni.switchTab({
					      url: "/pages/management/index",
					    });
					    uni.setStorageSync("flag", false);
					  } else if (this.information.check_status == 3) {
					    uni.navigateTo({
					      url: "/pages/management/customer",
					    });
					    uni.setStorageSync("flag", false);
					  } else if (this.information.app_index == 1) {
					    uni.navigateTo({
					      url: "/pages/management/welcome",
					    });
					  } 
					  uni.stopPullDownRefresh();
				  },1000)
	   })
   },
   watch: {

   },
   computed: {
   ...mapState({
         information: (state) => state.MANAGEMENT.information,
       }),
   }
 }
</script>

<style scoped lang='scss'>
	.waitFor{
		width: 100%;
		height: 492rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
.wait{
	width: 274rpx;
	height: 274rpx;
}
.contact{
	width: 100%;
	display: flex;
	justify-content: center;
	color: #262727;
	font-size: 32rpx;
}
</style>